import { _decorator, Component, find, instantiate, Node, Prefab } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('LevelJump')
export class LevelJump extends Component {

    @property(Prefab)
    pre:Prefab = null

    start() {
        this.node.on(Node.EventType.TOUCH_START,(e)=>{
            let pre = instantiate(this.pre)
            find('Canvas').addChild(pre)
            pre.setPosition(0,-50,0)
        },this)
    }

    update(deltaTime: number) {
        
    }
}


